<?php

	require_once("smarty/Smarty.class.php");

	class MySmarty extends Smarty{
		
		var $blockvars = array();
 		var $tmpvars = array();
 		var $provars = array();

		function MySmarty($SmartyPath="", $TmpPath="", $CachePath="", $CfgPath=""){

			Smarty::smarty();
			$this->SmartyPath = $SmartyPath;
			$this->template_dir = $SmartyPath . "/templates/";
			$this->compile_dir = $SmartyPath . "/templates_c/";
			$this->config_dir = $SmartyPath . "/configs/";
			$this->cache_dir = $SmartyPath . "/cache/";
			$this->left_delimiter = "{";
			$this->right_delimiter = "}";

			if(!empty($TmpPath)) $this->template_dir = $TmpPath;
			if(!empty($CachePath)) $this->compile_dir = $CachePath;
			if(!empty($CfgPath)) $this->config_dir = $CfgPath;
		}
		
		function setTemplate($TmpPath=""){ $this->template_dir = $TmpPath; }
		
		function setCache($CachePath=""){ $this->compile_dir = $CachePath; }

		function setPlugin($PluginPath){ $this->plugins_dir = array_merge($this->plugins_dir, array($PluginPath)); }

	}

?>